<extend name="Public/base"/>
<block name="content">
<h3 class="col-md-12">网站设置</h3>

<div class="row">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<ul class="nav nav-pills">
			   		<volist name="Think.config.CONFIG_GROUP_LIST" id="group">
					<li <eq name="id" value="$key">class="active"</eq>><a href="<{:U('group?id='.$key)}>"><{$group}>配置</a></li>
					</volist>
					<li class="active"><a href="<{:U('cache')}>">缓存静态</a></li>
				</ul>
			</div>
		
			<div class="panel-body">
    			<form class="form-horizontal" action="<{:U('setConfig')}>"  method="post">
        			<div class="form-group">											
        				<label class="col-sm-2 control-label">首页歌曲更新时间</label>
        				<div class="col-sm-2">
        					<input type="text" class="form-control" name="INDEX_SONGS_CACHE_TIME" value="<{$set.INDEX_SONGS_CACHE_TIME|default='86400'}>">
        				</div>
        				<p class="help-block">自动更新首页歌曲时间，值为0不更新，单位秒。默认1天</p>
        			</div>
        			<div class="form-group">											
        				<label class="col-sm-2 control-label">侧边栏数据更新时间</label>
        				<div class="col-sm-2">
        					<input type="text" class="form-control" name="SIDEBAR_CACHE_TIME" value="<{$set.SIDEBAR_CACHE_TIME|default='86400'}>">
        				</div>
        				<p class="help-block">自动更新侧边栏数据时间，开启静态后或值为0不更新，单位秒。默认1天。</p>        		
        			</div>				
        			<div class="form-group">											
        				<label class="col-sm-2 control-label">前台静态缓存</label>
        				<div class="col-sm-2">
        					<input class="hide" name="HTML_CACHE_ON" value="<{$set.HTML_CACHE_ON|default=0}>">  			
        					<if condition="$set['HTML_CACHE_ON'] == 1">
        					<div  class="switch-wrapper">
        						<span class="switch-enable selected">开启</span>
        						<span class="switch-disable">关闭</span>
        					</div>           						
        					<else/>
        					<div  class="switch-wrapper">
        						<span class="switch-enable">开启</span>
        						<span class="switch-disable selected">关闭</span>	
        					</div>
        					</if>       					
        				</div>
        				<p class="help-block">开启静态缓存，并且首页生成静态文件</p>
        			</div>
        			<div class="form-group">											
        				<label class="col-sm-2 control-label">静态缓存更新时间</label>
        				<div class="col-sm-2">
        					<input type="text" class="form-control" name="HTML_CACHE_TIME" value="<{$set.HTML_CACHE_TIME|default='86400'}>">        					
        				</div>
        				<p class="help-block">自动生成静态缓存更新时间，值为0不更新，单位秒</p>
        			</div>
        			
        			<div class="form-group">											
        				<label class="col-sm-2 control-label">静态缓存文件后缀</label>
        				<div class="col-sm-2">
        					<input type="text" class="form-control" name="HTML_FILE_SUFFIX" value="<{$set.HTML_FILE_SUFFIX|default='.html'}>">        					
        				</div>
        				<p class="help-block">自定义生成静态缓存文件的后缀名，格式：.html。</p>
        			</div>
    
					<div class="form-group">      		
            			<div class="col-sm-4 col-sm-offset-2">
                			<button class="btn btn-default" type="button" onclick="javascript:history.back(-1);return false;">取消</button>
                			<button class="btn btn-primary" type="submit">保存</button>
            			</div>
        			</div>
				</form>
			</div>		
		</div>
	</div>
</div>
</block>
<block name="script">
<script type="text/javascript">
highlight_subnav("<{:U('Config/group')}>","<{:U('Config/group')}>");
</script>
</block>	


